package com.atguigu.gulimall.cart.config;

import com.atguigu.gulimall.cart.inteceptor.CartInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 *    视图映射
 * @ClassName GulimallWebConfig
 * @Description TODO
 * @Author Administrator
 * @Date 2022/7/1 21:16
 * @Version 1.0
 **/
@Configuration
public class GulimallWebConfig implements WebMvcConfigurer {


    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new CartInterceptor()).addPathPatterns("/**");

    }
}
